package com.ssy.lingxi.logistics.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.logistics.api.dto.request.LogisticsCompanyAddRequest;
import com.ssy.lingxi.logistics.api.fallback.FreightRemoteControllerFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 内部feign接口 - 初始化基础物流公司
 * @author wyx
 * @version 2.0.0
 * @date 2021-12-14
 */
@FeignClient(name = "logistics-service", fallback = FreightRemoteControllerFeignFallback.class)
public interface LogisticsCompanyFeign {
    /**
     * 会员新增时同步基础物流公司
     * @param request 接口参数
     * @return 返回结果
     */
    @RequestMapping(value = "/logistics/company/feign/add", method = RequestMethod.POST)
    Wrapper<Void> addLogisticsCompany(@RequestBody @Validated LogisticsCompanyAddRequest request);
}
